package com.itheima.demo;

import com.itheima.demo01.Demo_Mythread02;

/**
 * @author Zhang_Han
 * @version 1.0
 * @date 2020/7/11 18:38
 */
public class Demo_Thread002 {
    public static void main(String[] args) {
        Demo_Mythread02 th = new Demo_Mythread02();
        Thread t = new Thread(th);
        t.setName("线程一");
        t.start();
        for (int i = 0; i < 100; i++) {
            System.out.println("我是主线程"+i);
        }

    }

    private static void method001() {
        Demo_Mythread02 th = new Demo_Mythread02();
        Thread t = new Thread(th);
        t.start();
    }
}
